{include file="admin/top.php" subject='suppliers'}
{include file="suppliers/top.php" subject='shops'}
<div id="content">
    <table width="100%" border="0" cellspacing="0" cellpadding="5" id="lister">
      <tr id="title">
        <td width="40">编号</td>
        <td>仓库名称</td>
        <td>仓库类型</td>
        <td>展示为</td>
        <td>&nbsp;</td>
      </tr>
      {shops limit=20 pager=pager page=$segment.page}
      <tr id="content">
        <td>{$shops.id}</td>
        <td><a href="{$site_admin}m=inventory&s=shops.php&uri=view&id={$shops.id}">{$shops.title}</a></td>
        <td>{$shop_type[$shops.type]}</td>
        <td><a href="{$site_admin}m=inventory&s=shops.php&uri=view&id={$shops.id}">{$shops.show_title}</a></td>
        <td align="right">
        {if 0}{rights right='shops_delete'}<a href="{$site_admin}m=inventory&s=shops.php&uri=remove&id={$shops.id}" onclick="return confirm('删除数据不可恢复, 确定删除?')">删除</a>{/rights}{/if}
        {rights right='shops_modify'}<a href="{$site_admin}m=inventory&s=shops.php&uri=modify&id={$shops.id}">编辑</a>{/rights}
        <a href="{$site_admin}m=inventory&s=shops.php&uri=view&id={$shops.id}">查看</a>
        </td>
      </tr>
      {/shops}
      {if $pager->rows==0}
      <tr id="content">
        <td colspan="20">&nbsp;</td>
      </tr>
      {/if}
    </table>
    <div id="pager" class="mt10">
        {if $pager} 共{$pager->rows}条记录 第{$pager->pagecurrent}/{$pager->pages}页 {/if} 		
        {if $pager->current > 1}<a href="{url s1=1}">首页</a>{/if}
        {if $pager->current > 1}<a href="{url s1=$pager->current-1}">上页</a>{/if}
        {if $pager->current < $pager->pages}<a href="{url s1=$pager->current+1}">下页</a>{/if}
        {if $pager->current < $pager->pages}<a href="{url s1=$pager->pages}">尾页</a>{/if}
    </div>
    <p>&nbsp;</p>
    {rights right='shops_create'}<ul id="addmenu"><li><a href="{$site_admin}m=inventory&s=shops.php&uri=create">添加一个新的仓库</a></li></ul>{/rights}
</div>
{include file="admin/bottom.php"}
</body>
</html>
